<?php	
//统计总数
select count(*) from stu;
//求最小值
select min(age) from stu;
//求最大值
select max(age) from stu;
//求和
select sum(age) from stu;
//平均数
select avg(age) from stu;
//分组
select sex from stu group by sex;
//分组进行统计
select sex,count(*) from stu group by sex;
//having跟group by 进行合作
select sex,count(*) from stu group by sex having sex="女";



